package com.enterprise.projectManager.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Entity
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Problem {
    @ManyToOne
    @JoinColumn(name = "project_id")
    private Project project;
    @Id
    private String problemId;
    private String problemType;
    private String problemState;
    private String problemDescription;
    private String problemHandler;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date problemHandledate;
    private String problemSender;
    private String problemSendcompany;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date problemSenddate;
    private String problemAdviced;
    private String problemHandleway;
}

